// This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface 
// (the "Fluent UI") and is provided only as referential material to supplement the 
// Microsoft Foundation Classes Reference and related electronic documentation 
// included with the MFC C++ library software.  
// License terms to copy, use or distribute the Fluent UI are available separately.  
// To learn more about our Fluent UI licensing program, please visit 
// http://msdn.microsoft.com/officeui.
//
// Copyright (C) Microsoft Corporation
// All rights reserved.

#pragma once

#include "MessageListCtrl.h"
class CMessageListToolBar : public CMFCToolBar
{
	virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
	{
		CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
	}

	virtual BOOL AllowShowOnList() const { return FALSE; }
};

class CMessageListPane : public CDockablePane
{
// Construction
public:
	CMessageListPane();

	void AdjustLayout();

// Attributes
public:
	CMessageListCtrl m_wndMessageList;
	CMessageListToolBar m_wndToolBar;

// Implementation
public:
	virtual ~CMessageListPane();

protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnProperties();
	afx_msg void OnViewGroupbytitle();
	afx_msg void OnViewGroupbytime();
	afx_msg void OnViewGroupbyauthor();
	afx_msg void OnViewUnreadonly();
	afx_msg void OnUpdateViewGroupbytitle(CCmdUI *pCmdUI);
	afx_msg void OnUpdateViewGroupbyauthor(CCmdUI *pCmdUI);
	afx_msg void OnUpdateViewGroupbytime(CCmdUI *pCmdUI);
	afx_msg void OnUpdateViewUnreadonly(CCmdUI *pCmdUI);
	afx_msg void OnPaint();
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	DECLARE_MESSAGE_MAP()
public:
	void OpenFolder(KingOfCSharp::iHunter::IFolder ^folder);
	void ShowSearchResult();
	System::Collections::IEnumerable ^GetSelectedMessageGuids();
};

